package com.aaa.hospital.controller;

import com.aaa.hospital.aop.Log;
import com.aaa.hospital.pojo.domain.DoctorShiftS;
import com.aaa.hospital.pojo.query.DoctorShiftQuery;
import com.aaa.hospital.result.AjaxResult;
import com.aaa.hospital.service.ShiftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ZQ on 2022/2/15
 */
@RestController
@RequestMapping("Sm")
public class ShiftController {

    @Autowired
    private ShiftService shiftService;

//    @RequestMapping("DoctorName")
//    public AjaxResult DoctorName(){
//        return shiftService.DoctorsName();
//    }

    @RequestMapping("aDoctor/{id}")
    public AjaxResult aDoctor(@PathVariable("id") Integer id){
        return shiftService.aDoctor(id);
    }

    @RequestMapping("addShift")
    @Log("添加排班")
    public AjaxResult addShift(DoctorShiftS doctorShiftS){

        return shiftService.addShift(doctorShiftS);
    }

    @RequestMapping("DoctorShiftQuery")
    public AjaxResult shiftQuery(DoctorShiftQuery doctorShiftQuery){

        return shiftService.shiftQuery(doctorShiftQuery);
    }
}
